package com.scalar.chiptrack.operations.dataentry.forms;

import com.scalar.chiptrack.ChipTrackActionForm;
import com.scalar.chiptrack.operations.dataentry.LotDetails;
import com.scalar.chiptrack.utils.AutoGrowingArrayList;

import java.util.ArrayList;

import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * User: ChandraSekhar
 * Date: Feb 28, 2008
 * Time: 5:28:38 PM
 */
public class DieBankTransitForm extends ChipTrackActionForm
{
    private int processStepId = -1;
    private int locationId    = -1;
    private int lotId         = -1;
    private boolean assyRelease = true;

    ArrayList wipLotsList = new AutoGrowingArrayList(LotDetails.class);
    ArrayList waferInfoList = new AutoGrowingArrayList(LotDetails.class);
    ArrayList confirmWipLotsList = new AutoGrowingArrayList(LotDetails.class);

    public int getProcessStepId() {
        return processStepId;
    }

    public void setProcessStepId(int processStepId) {
        this.processStepId = processStepId;
    }

    public int getLocationId() {
        return locationId;
    }

    public void setLocationId(int locationId) {
        this.locationId = locationId;
    }

    public int getLotId() {
        return lotId;
    }

    public void setLotId(int lotId) {
        this.lotId = lotId;
    }

    public ArrayList getWipLotsList() {
        return wipLotsList;
    }

    public void setWipLotsList(ArrayList wipLotsList) {
        this.wipLotsList = wipLotsList;
    }

    public ArrayList getWaferInfoList() {
        return waferInfoList;
    }

    public void setWaferInfoList(ArrayList waferInfoList) {
        this.waferInfoList = waferInfoList;
    }

    public ArrayList getConfirmWipLotsList() {
        return confirmWipLotsList;
    }

    public void setConfirmWipLotsList(ArrayList confirmWipLotsList) {
        this.confirmWipLotsList = confirmWipLotsList;
    }

    public boolean isAssyRelease() {
        return assyRelease;
    }

    public void setAssyRelease(boolean assyRelease) {
        this.assyRelease = assyRelease;
    }

    public void reset( ActionMapping mapping, HttpServletRequest request )
	{
        if ( wipLotsList != null )
        {
            int listSize = wipLotsList.size();
            for (int i = 0; i < listSize; i++)
            {
                LotDetails lotDetails = (LotDetails) wipLotsList.get(i);
                lotDetails.setChecked( false );
            }
        }
        assyRelease = false;
    }
}
